﻿@model MultiChoiceVoting.ViewModels.MultiChoiceVotingIndexViewModel
@*@using Orchard.Media.Extensions*@

@{ Layout.Title = T("Multi-Choice Voting").ToString(); }

<div class="manage">@Html.ActionLink(T("Add new voting").ToString(), "MultiChoiceVotingDashboard", new { }, new { @class = "button primaryAction" })</div>

<fieldset>
    <table class="items" summary="@T("This is a table of the multi-choice votings currently available for use in your application.")">
        <thead>
            <tr>
                <th>@T("Name")</th>
                <th>@T("Release Date")</th>
                <th>@T("Finish Date")</th>
                <th>@T("Active")</th>
            </tr>
        </thead>
        <tbody>
            @if (Model.Questions != null)
            {
                foreach (var question in Model.Questions)
                {
                <tr>
                    <td>
                        @Html.ActionLink(question.Name, "MultiChoiceVotingDashboard", new { votingId = question.Id })
                    </td>
                    <td>
                        @question.ReleaseDate
                    </td>
                    <td>
                        @question.FinishDate
                    </td>
                    <td>
                        @question.IsActive
                    </td>
                </tr>
                }
            }
        </tbody>
    </table>
</fieldset>
